<?php

require_once('Connection.php');

abstract class DataParser
{
    protected $successForward;
    protected $query;
    protected $response;
    
    public function __construct()
    {
        $this->getForwards();
        $this->generateQuery($data);
        $conn = new Connection();
        $postResults = $conn->getResults($this->query);
        $request = new HttpRequest($this->successForward, HttpRequest::METH_POST);
        $request->addPostFields(array("data"=>$postResults));
        $this->response = $request->send();
    }
    
    public function getResponse()
    {
        return $this->response;
    }
    
    public abstract function generateQuery($data);
    public abstract function getForwards();
}
?>
